import request from '@/utils/request'

// api地址
const api = {
  getSetting: 'index/getSetting',
  getPhotoList:'index/getPhotoList',
  getCategory:'index/getCategory',
  addLikes:'index/addLikes',
  
  addCart:'cart/add',
  cartList:'cart/list',
deleteCart:'cart/delete',
payDirectPhotoBuy:'pay/directPhotoBuy',


faceSearchPhoto:'index/faceSearchPhoto',


getFreePhotoList:'index/getFreePhotoList',

myReward:'index/myReward',

myPhoto:'index/myPhoto',

getWxUserInfo:'passport/getWxUserInfo',

payReward:'/h5/pay/reward',
}
// 首页信息
export const getSetting = (param) => {
  return request.post(api.getSetting, param)
}
// 获取Wx用户信息
export const getWxUserInfo = (param) => {
  return request.post(api.getWxUserInfo, param)
}
// 分类
export const getCategory = (param) => {
  return request.post(api.getCategory, param)
}

// 图片列表
export const getPhotoList = (param) => {
  return request.post(api.getPhotoList, param)
}

// 图片点赞
export const addLikes = (param) => {
  return request.post(api.addLikes, param)
}
// 添加购物车
export const addCart = (param) => {
  return request.post(api.addCart, param)
}
// 购物车列表
export const cartList = (param) => {
  return request.post(api.cartList, param)
}
// 图片删除
export const deleteCart = (param) => {
  return request.post(api.deleteCart, param)
}
// 单张支付
export const payDirectPhotoBuy = (param) => {
	
  return request.post(api.payDirectPhotoBuy, param)
}

// 人脸识图
export const faceSearchPhoto = (param) => {
  return request.post(api.faceSearchPhoto, param)
}

// 免费下载图片
export const getFreePhotoList = (param) => {
  return request.post(api.getFreePhotoList, param)
}

// 我的 
// 已购
export const getmyPhoto = (param) => {
  return request.post(api.myPhoto, param)
}

// 打赏列表
export const getmyReward = (param) => {
  return request.post(api.myReward, param)
}


// 打赏
export const payReward = (param) => {
  return request.post(api.payReward, param)
}

